﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using yiwei.Repository.Entity;

namespace yiwei.Repository.EntityConfig
{
    public class ModuleElementMap : IEntityTypeConfiguration<ModuleElement>
    {
        public void Configure(EntityTypeBuilder<ModuleElement> builder)
        {
            builder.ToTable("ModuleElement");
            builder.HasKey(c => c.Id);
            builder.Property(b => b.DomId).HasColumnType("varchar(200)").IsRequired();
            builder.Property(b => b.Name).HasColumnType("varchar(200)").IsRequired();
            builder.Property(b => b.Attr).HasColumnType("varchar(200)");
            builder.Property(b => b.Class).HasColumnType("varchar(200)");
            builder.Property(b => b.Remark).HasColumnType("varchar(200)");
            builder.Property(b => b.Attr).HasColumnType("varchar(200)");
        }
    }
}
